package com.crm.common.ka.core.common;

public class CrmCommonEnum {

    /**
     * 微信二维码类型
     */
    public enum CrmCcEnum {
        角色(0,"角色"),部门(1,"部门"),用户(2,"用户"),数据字段(3,"用户")
        ;

        private final Integer key;
        private final String value;

        CrmCcEnum(Integer key, String value)
        {
            this.key = key;
            this.value = value;
        }

        public Integer getKey() {
            return key;
        }

        public String getValue() {
            return value;
        }


        public static String getValueByKey(Integer key){
            for (CrmCommonEnum.CrmCcEnum enums: values()) {
                if(enums.getKey().equals(key)){
                    return enums.getValue();
                }
            }
            return null;
        }
    }

    /**
     * 流程字段权限枚举
     */
    public enum ExamineFieldsRoleEnum {
        线索创建人("leads_create_id","线索创建人"),销售负责人("owner_user_id","销售负责人"),助教协作人("assistant_user_id","助教协作人"),营销讲师("teacher_id","营销讲师")
        ,退款负责人("refund_user_id","退款负责人")
        ;

        private final String key;
        private final String value;

        ExamineFieldsRoleEnum(String key, String value)
        {
            this.key = key;
            this.value = value;
        }

        public String getKey() {
            return key;
        }

        public String getValue() {
            return value;
        }


        public static String getValueByKey(String key){
            for (CrmCommonEnum.ExamineFieldsRoleEnum enums: values()) {
                if(enums.getKey().equals(key)){
                    return enums.getValue();
                }
            }
            return null;
        }
    }

}
